Read and write excel files (or any files) multiple times in the same Alteryx workflow

Read and write excel files (or any files) multiple times in the same Alteryx workflow

Clock Icon2023.07.28

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

(和文はこちらから)

Introduction:

This post explains how to read and write an excel file (or any other file) multiple times in the same Alteryx workflow using Control Containers.

How to Achieve it:

Using Control Container, a new tool which was introduced with the Alteryx 2023.1 version, it is easily possible to multiple read and multiple write for any file in the same workflow.

To begin with let us consider a ordinary workflow which outputs an excel file in the first step and tries to read this file for further downstream processing as shown below. When this workflow is executed for the first time, the “Output” file is successfully created in first step but it can’t be read yet by an input tool of second step.

Similarly on the following executions, the second step’s input tool has gained access to the “Output” file which is being read thus prohibiting its write access in the step 1.

The Control Container tool comes very handy in such a situation. By enclosing these two steps in two separate control containers, and then connecting those containers, it is possible to execute the work flow smoothly. Thus multiple reads / writes for the same file can be easily achieved by adding such control containers and connecting them as shown below.

One consideration for the order of execution is that, Control Containers will execute tools inside it only after receiving all records via its Control Input anchor. Thus the order of execution can be adjusted by connecting these containers one after the other as required.

Summary:

Control container comes handy when the same file needs to be used for multiple reads / writes in a workflow.

Share this article

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.